<?php

namespace App\Http\Controllers\Wechat;

use App\Http\Controllers\Controller;
use App\Services\HomeBannerService;
use App\Services\ResourcesService;

class OperationController extends Controller
{

    /**
     * @Notes 获取首页banner
     * @return array
     * @author ypp
     * @date 2021/3/5
     * @time 9:41
     */
    public function getHomeBannerList(HomeBannerService $HomeBannerService): array
    {
        $info = $HomeBannerService->getBannerList();
        return $info['status'] ? $this->success($info['data']) : $this->error(['msg']);
    }
    /**
     * @Notes 获取首页banner
     * @return array
     * @author ypp
     * @date 2021/3/5
     * @time 9:41
     */
    public function getResourcesList(ResourcesService $ResourcesService ): array
    {
        $info = $ResourcesService->getResourcesList();
        return $info['status'] ? $this->success($info['data']) : $this->error(['msg']);
    }
}
